﻿#region license
// Copyright (C) 2020 ClassicUO Development Community on Github
// 
// This project is an alternative client for the game Ultima Online.
// The goal of this is to develop a lightweight client considering
// new technologies.
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <https://www.gnu.org/licenses/>.
#endregion

using Microsoft.Xna.Framework;

namespace ClassicUO.Game.Data
{
    internal readonly struct ContainerData
    {
        public ContainerData(ushort graphic, ushort sound, ushort closed, int x, int y, int w, int h, ushort iconizedgraphic = 0, int minimizerX = 0, int minimizerY = 0)
        {
            Graphic = graphic;
            Bounds = new Rectangle(x, y, w, h);
            OpenSound = sound;
            ClosedSound = closed;
            MinimizerArea = (minimizerX == 0 && minimizerY == 0 ? Rectangle.Empty : new Rectangle(minimizerX, minimizerY, 16, 16));
            IconizedGraphic = iconizedgraphic;
        }

        public readonly ushort Graphic;
        public readonly Rectangle Bounds;
        public readonly ushort OpenSound;
        public readonly ushort ClosedSound;
        public readonly Rectangle MinimizerArea;
        public readonly ushort IconizedGraphic;
    }
}